package com.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;



/**
 * Created by bai on 2017/6/24.
 */
@Controller
public class Hello {
    @RequestMapping("/show") @ResponseBody
    public void show(){
        System.out.println("你好啊");
    }
    @RequestMapping("/name.do")
    public ModelAndView showw(){
        ModelAndView mv = new ModelAndView();
        mv.addObject("name","hello________springmvc");
        mv.setViewName("show");
        return mv;
    }
}
